﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="GastoObraListGrid.ascx.cs" Inherits="UILGestion.Control.GastoObraListGrid" %>
<%@ Register Assembly="CustomControls" Namespace="CustomControls" TagPrefix="cc1" %>
<script src="../Scripts/controlGrid.js" type="text/javascript"></script>
<link href="../css/main.css" rel="stylesheet" type="text/css" />
<asp:Panel runat="server" ID="PanelRecepcion" >
<asp:DataPager ID="pager" PagedControlID="ListView1" runat="server" >
    <Fields>
      <cc1:PagerField NextPageImageUrl="~/Images/arrow_right2.gif" PreviousPageImageUrl="~/images/arrow_left.gif" />
    </Fields>
</asp:DataPager>
<asp:ListView ID="ListView1" runat="server" OnDataBound="ListView1_DataBound" 
    DataKeyNames="idInternal" onitemdatabound="ListView1_ItemDataBound">
    <LayoutTemplate>
        <table id="itemPlaceHolderContainer" border="0" runat="server" class="ms-crm-List-Header">
            <tr id="Tr1" runat="server">
                <th id="Th1" runat="server">
     

                    <asp:LinkButton ID="lb2" CommandName="Sort" ForeColor="Blue" CommandArgument="numDocumentoStr" runat="server">NUMERO</asp:LinkButton>
                </th>
                 <th id="Th7" runat="server">
     
                    <asp:LinkButton ID="LinkButton5" ForeColor="Blue"  runat="server"></asp:LinkButton>
                </th>
                <th id="Th3" runat="server">
                    <asp:LinkButton ID="lb3" CommandName="Sort" ForeColor="Blue" CommandArgument="fechaEmision" runat="server">FECHA</asp:LinkButton>
                </th>
                
                <th id="Th2" runat="server">
                    <asp:LinkButton ID="LinkButton1" CommandName="Sort" ForeColor="Blue"  CommandArgument="proveedor" runat="server">PROVEEDOR</asp:LinkButton>
                </th>
                
                  <th id="Th9" runat="server">
                    <asp:LinkButton ID="LinkButton7" CommandName="Sort" ForeColor="Blue" CommandArgument="formaPago" runat="server">FORMA PAGO</asp:LinkButton>
                </th>
                 <th id="Th8" runat="server">
                    <asp:LinkButton ID="LinkButton6" CommandName="Sort" ForeColor="Blue" CommandArgument="estado" runat="server">ESTADO</asp:LinkButton>
                </th>
                <th id="Th4" runat="server" align="right" >
                    <asp:LinkButton ID="LinkButton2" CommandName="Sort" ForeColor="Blue" CommandArgument="subTotal" runat="server">SUB TOTAL</asp:LinkButton>
                </th>
                <th id="Th5" runat="server" align="right">
                    <asp:LinkButton ID="LinkButton3" CommandName="Sort" ForeColor="Blue"  CommandArgument="IGVTotal" runat="server">IGV</asp:LinkButton>
                </th>
                <th id="Th6" runat="server" align="right">
                    <asp:LinkButton ID="LinkButton4" CommandName="Sort" ForeColor="Blue" CommandArgument="total" runat="server">TOTAL</asp:LinkButton>
                </th>
                  <th id="Th10" runat="server">
                    <asp:LinkButton ID="LinkButton8" CommandName="Sort" ForeColor="Blue" CommandArgument="numComparativo" runat="server">COMPARATIVO</asp:LinkButton>
                </th>
               
                  <th id="Th11" runat="server">
                   
                </th>
                
            </tr>
            <tr id="itemPlaceholder" runat="server">
            </tr>
        </table>



    </LayoutTemplate>
    <ItemTemplate>
        <tr style='background-color: <%# (Container.DataItemIndex % 2 == 0)?"#fff":"#eee" %>'>
            <td Width="90px">
                <%--<asp:Image ID="PersonIcon" ImageUrl="~/images/individual.gif" Width="10px" Height="12px"
                    runat="server" />--%>
                <%--<asp:HyperLink ID="PersonLink" runat="server" NavigateUrl='<%# Eval("idInternal","~/ObraAdmin/ComparativoReadForm.aspx?id={0}") %>'
                    Text='<%# Eval("numDocumento") %>'></asp:HyperLink>--%>


                <asp:Hyperlink runat= "server"  ForeColor="Blue"
                Text='<%# DataBinder.Eval(Container.DataItem,"numDocumentoStr").ToString()%>'  
                 Target="_self"  ID="OrdenCompra"
                NavigateUrl='<%# "~/ObraAdmin/OrdenCompras/GastoObraReadForm.aspx?id=" + DataBinder.Eval (Container.DataItem,"idInternal").ToString() + 
                 "&idObra=" + DataBinder.Eval(Container.DataItem,"idObra").ToString()%>' 
               />   
                
            </td>
             <td>
             <asp:Hyperlink runat= "server"  ForeColor="Blue" Width="75px"
                Text="Imprimir"
                 Target="_blank"  
                 ID="Hyperlink1"
                NavigateUrl='<%# "~/rpt/PrintForm.aspx?type=GASTOOBRA&id=" + DataBinder.Eval (Container.DataItem,"idInternal").ToString() + 
                 "&idObra=" + DataBinder.Eval(Container.DataItem,"idObra").ToString()%>' 
                 
               />  
            </td>
            <td >
                    <%# Eval("fechaStr")%> <br />
            </td>
           <%-- <td>
                <input id="Checkbox1" type="checkbox" runat="server" checked= '<%# Eval("bitActivo")%>' disabled="disabled">
               <br />
            </td>--%>
             <td width="350px">
                <%# Eval("Proveedor")%><br />
            </td>
              <td width="90px">
                <%# Eval("formaPago")%><br />
            </td>
             <td>
                <%# Eval("estado")%><br />
            </td>
            <td align="right" width="90px">
            <%# Eval("subTotalMon")%><br />
                 
            </td>
             <td align="right" width="90px">
            <%# Eval("IGVTotalMon")%><br />
                 
            </td>
             <td align="right" Width="90px">
            <%# Eval("totalMon")%><br />
                 
            </td>
          <td>
           <asp:Hyperlink runat= "server"  ForeColor="Blue"
                Text='<%# DataBinder.Eval(Container.DataItem,"numComparativo").ToString()%>'  
                 Target="_self"  ID="Hyperlink2"
                NavigateUrl='<%# "~/ObraAdmin/Comparativos/ComparativoReadForm.aspx?id=" + DataBinder.Eval (Container.DataItem,"idComparativo").ToString() + 
                 "&idObra=" + DataBinder.Eval(Container.DataItem,"idObra").ToString()%>' 
               />   
          </td>
          <td>
          
            <asp:ImageButton ID="lnkRemove" runat="server" BorderColor="Control" 
                     CommandArgument='<%# Eval("idInternal")%>' ImageUrl="../Images/delete.gif" 
                     OnClick="Deleteitem" OnClientClick="return confirm('Usted quiere eliminar?')" />
          </td>
        </tr>
    </ItemTemplate>
    <EmptyDataTemplate>
        <table id="Table1" runat="server" >
            <tr>
                <td>
                   <h2 style="font-size: x-small; color: #960818">
                        No existe Informacion.</h2>
                </td>
            </tr>
        </table>
    </EmptyDataTemplate>
</asp:ListView>



</asp:Panel>

    
     